package work;

import complexity.Queue;
import tree.BinaryTree;

import java.util.Set;

public class BinaryTreeTest {
    public static void main(String[] args) {
        BinaryTree<Integer, String> binaryTree = new BinaryTree<>();
        binaryTree.put(11,"name");
        binaryTree.put(3,"name3");
        binaryTree.put(5,"name5");
        binaryTree.put(10,"name10");
        binaryTree.put(12,"name12");
        binaryTree.put(15,"name15");
        binaryTree.put(18,"name18");
        binaryTree.put(19,"name19");
        Queue<Integer> integers = binaryTree.preErgodic();
        for (Integer integer : integers) {
            System.out.print(integer+" ");
        }
        System.out.println();
        integers = binaryTree.midErgodic();
        for (Integer integer : integers) {
            System.out.print(integer+" ");
        }
        System.out.println();
        integers = binaryTree.lastErgodic();
        for (Integer integer : integers) {
            System.out.print(integer+" ");
        }
        System.out.println();
        Queue<Integer> queue = binaryTree.layerErgodic();
        for (Integer integer : queue) {
            System.out.print(integer+" \t");
        }
        System.out.println();
        System.out.println("最大深度问题");
        System.out.println(binaryTree.maxDepth());
//
    }
}




//System.out.println(binaryTree.get(1));
//        binaryTree.delete(5);
////        System.out.println(binaryTree.get(5));
//        System.out.println(binaryTree.size());
//        binaryTree.minNode();
//        binaryTree.maxNode();
